# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=py3-ovos-backend-client
pkgver=0.1.0a13
pkgrel=0
pkgdesc="Unofficial python api for interaction with https://api.mycroft.ai"
url="https://github.com/OpenVoiceOS/ovos-backend-client"
# s390x blocked by py3-speechrecognition
arch="noarch !s390x"
license="Apache-2.0"
depends="
	py3-json-database
	py3-ovos-bus-client
	py3-ovos-plugin-manager
	py3-ovos-utils
	py3-speechrecognition
	py3-timezonefinder
	"
makedepends="
	py3-gpep517
	py3-setuptools
	py3-wheel
	"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
source="https://github.com/OpenVoiceOS/ovos-backend-client/archive/V$pkgver/ovos-backend-client-$pkgver.tar.gz"
builddir="$srcdir/ovos-backend-client-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
8da8176974b3341bbaa49e3149061dfede0e0748151e7194b75a64070251de1d453b5d010325aaa544e6ae2808aaed54308b626e8df213939348d5b5e4473196  ovos-backend-client-0.1.0a13.tar.gz
"
